package com.yangye.picommon.enums;

/**
 * @author Page.Yang
 * @date 2019/4/3 0003
 */
public enum PiResultEnum {

    // 请求成功
    SUCCEED(20000, "操作成功"),
    // 请求失败
    FAIL(50000, "系统异常"),
    // 登录失败
    LOGIN_FAILURE(40010, "登录失败"),
    UNAUTHORIZED(40011, "未登录"),
    BAD_USERNAME_PASSWORD(40012, "用户名或者密码错误"),
    DISABLED(40013, "帐号被禁用"),
    BAD_TOKEN(40014, "token错误"),
    TOKEN_EXPIRED(40015, "token已过期"),
    PERMISSION_DENIED(40016, "无权限"),
    UNSUPPORTED_METHOD(40017, "当前请求方式不支持");

    private int code;
    private String msg;

    PiResultEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
